package com.atguigu.springsecurity.controller;

import com.atguigu.springsecurity.service.UserService;
import com.atguigu.springsecurity.util.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class LogoutController {

    @Autowired
    private UserService userService;

    /**
     * 登出功能
     * @return
     */
    @GetMapping("/user/logout")
    public ResponseResult logout() {

        return userService.logout();
    }
}
